<?php

//
// TwitterModule
// Uses the Twitter API v1.1
// Grabs the most recent tweets for display as a module on a page
//

class TwitterModule extends LiriopeModule {

  public function one($vars=NULL) {
    global $module;

    $twitterAPI = new Twitter(array(
      'screen_name' => 'nrhc',
      'access_token' => c::get('twitter.accessToken')
    ));

    $module->tweets = $twitterAPI->userTimeline(1)->get();
  }

}
